import service from "./request"

//教师管理
export function teacherGetPage(params, page) {
    return service({
        url: '/admin/teacher/page/' + page,
        method: 'get',
        params: params
    })
}


// 教师页数
export function teacherGetPageCount(params) {
    return service({
        url: '/admin/teacher/page/count',
        method: 'get',
        params: params
    })
}

// 教师添加
export function teacherAdd(data) {
    return service({
        url: '/admin/teacher',
        method: 'post',
        data: data
    })
}
//删除
export function teacherDelete(id) {
    return service({
        url: '/admin/teacher/' + id,
        method: 'delete',
    })
}
//系名
export function departmentName() {
    return service({
        url: "/admin/department/names",
        method: "get"
    })
}

//根据id
export function teacherInfo(id) {
    return service({
        url: '/admin/teacher/' + id,
        method: 'get',
    })
}

//编辑
export function teacherEdit(data) {
    return service({
        url: '/admin/teacher',
        method: 'put',
        data: data
    })
}